/*
	This file is part of the OdinMS Maple Story Server
    Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
                       Matthias Butz <matze@odinms.de>
                       Jan Christian Meyer <vimes@odinms.de>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License version 3
    as published by the Free Software Foundation. You may not use, modify
    or distribute this program under any other version of the
    GNU Affero General Public License.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

//modify by shaun166 to work on new command system pls don delete 

package net.sf.odinms.client.messages.commands;

import java.rmi.RemoteException;
import java.sql.SQLException;
import java.sql.Connection;
import java.sql.PreparedStatement;
//import java.util.concurrent.ScheduledFuture;

import net.sf.odinms.database.DatabaseConnection;

import net.sf.odinms.net.channel.handler.OXHandler;
import net.sf.odinms.server.maps.FakeCharacter;
import net.sf.odinms.client.MapleCharacter;
import net.sf.odinms.client.messages.CommandDefinition;
import net.sf.odinms.client.messages.Command;
import net.sf.odinms.client.messages.IllegalCommandSyntaxException;
import net.sf.odinms.client.messages.MessageCallback;
import net.sf.odinms.client.MapleClient;
import net.sf.odinms.client.MapleJob;
import net.sf.odinms.client.MapleStat;
import net.sf.odinms.server.TimerManager;
import net.sf.odinms.scripting.npc.NPCScriptManager;
import net.sf.odinms.client.SkillFactory;
import net.sf.odinms.net.channel.ChannelServer;
import net.sf.odinms.tools.MaplePacketCreator;
import net.sf.odinms.tools.StringUtil;
import static net.sf.odinms.client.messages.CommandProcessor.getOptionalIntArg;
import net.sf.odinms.tools.MockIOSession;
import net.sf.odinms.server.life.MapleLifeFactory;
import net.sf.odinms.server.movement.LifeMovementFragment;
import net.sf.odinms.net.MaplePacket;
import net.sf.odinms.server.life.MapleMonster;
import net.sf.odinms.client.MapleDisease;
import net.sf.odinms.server.life.MobSkillFactory;


import java.sql.ResultSet;
import java.util.List;
import java.util.ArrayList;
import net.sf.odinms.server.MapleHiredMerchant;
import net.sf.odinms.server.maps.MapleMap;
import net.sf.odinms.server.movement.RelativeLifeMovement;



public class customCommands implements Command {
    private static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(customCommands.class);
    final private static String[] reasons = {"Hacking", "Botting", "Scamming", "Fake GM", "Harassment", "Advertising"};

    @SuppressWarnings("static-access")
	@Override
	public void execute(MapleClient c, MessageCallback mc, String[] splitted) throws IllegalCommandSyntaxException {
        if (splitted[0].equals("!spy")) {
            ChannelServer cserv = c.getChannelServer();
            MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
            double var = victim.getJumpMod();
            double var2 =  victim.getSpeedMod();
            int str = victim.getStr();
            int dex = victim.getDex();
            int intel = victim.getInt();
            int luk = victim.getLuk();
            int meso = victim.getMeso();
            int maxhp = victim.getCurrentMaxHp();
            int maxmp = victim.getCurrentMaxMp();
            mc.dropMessage("JumpMod is" + var + " and Speedmod is" + var2+ "!");
            mc.dropMessage("Players stats are:");
            mc.dropMessage(" Str: "+ str+", Dex: "+ dex+ ", Int: " + intel + ", Luk: "+ luk +" .");
            mc.dropMessage("Player has "+ meso + "mesos.");
            mc.dropMessage("Max hp is" + maxhp + " Max mp is" + maxmp + ".");
        } else if (splitted[0].equals("!avatar")) {
            if (splitted.length == 1) {
                mc.dropMessage("!avatar <victim> <type> <text>, type: love, cloud, or diablo.");
            }
            MapleCharacter victim = c.getChannelServer().getPlayerStorage().getCharacterByName(splitted[1]);
            String type = splitted[2];
            int channel = victim.getClient().getChannel();
            String text = StringUtil.joinStringFrom(splitted, 3);
            int itemID = 0;
            if(type.equals("love"))
                itemID = 5390002;
            else if(type.equals("cloud"))
                itemID = 5390001;
            else if(type.equals("diablo"))
                itemID = 5390000;
            else {
                mc.dropMessage("Invalid type (use love, cloud, or diablo)");
                return;
            }
                
            String[] lines = {"", "", "", ""};

            if(text.length() > 30) {
                lines[0] = text.substring(0, 10);
                lines[1] = text.substring(10, 20);
                lines[2] = text.substring(20, 30);
                lines[3] = text.substring(30);
            } else if(text.length() > 20) {
                lines[0] = text.substring(0, 10);
                lines[1] = text.substring(10, 20);
                lines[2] = text.substring(20);
            } else if(text.length() > 10) {
                lines[0] = text.substring(0, 10);
                lines[1] = text.substring(10);
            } else if(text.length() <= 10) {
                lines[0] = text;
            }

            List<String> list = new ArrayList<String>();
            list.add(lines[0]);
            list.add(lines[1]);
            list.add(lines[2]);
            list.add(lines[3]);

            try {
                MaplePacket mp = MaplePacketCreator.getAvatarMega(victim, channel, itemID, list, false);
                victim.getClient().getChannelServer().getWorldInterface().broadcastMessage(null, mp.getBytes());
            } catch(Exception e) {
                log.info("Error with avatar mega", e);
            }
        } else if (splitted[0].equals("!guildmessage")) {
            c.getPlayer().genericGuildMessage(Integer.parseInt(splitted[1]));
        } else if (splitted[0].equals("!alliancemessage")) {
            c.getSession().write(MaplePacketCreator.genericAllianceMessage((byte)Integer.parseInt(splitted[1])));
        } else if (splitted[0].equals("!packet")) {
            c.getSession().write(MaplePacketCreator.customPacket(StringUtil.joinStringFrom(splitted, 1)));
        } else if (splitted[0].equals("!sendlink")) {
            c.getSession().write(MaplePacketCreator.sendGuestTOS(Integer.parseInt(splitted[1])));
        } else if (splitted[0].equals("!testpacket")) {
            c.getSession().write(MaplePacketCreator.customPacket(splitted[1], Integer.parseInt(splitted[2])));
        } else if (splitted[0].equals("!whereiseveryone")) {
            ChannelServer cserv = c.getChannelServer();
            for (MapleCharacter mch : cserv.getPlayerStorage().getAllCharacters()) {
                if (mch != null) {
                    SkillFactory.getSkill(9101004).getEffect(1).applyTo(mch);
                }
            }
        } else if (splitted[0].equals("!unbuffworld")) {
            ChannelServer cserv = c.getChannelServer();
            for (MapleCharacter mch : cserv.getPlayerStorage().getAllCharacters()) {
                if (mch != null) {
                    mch.cancelAllBuffs();
                }
            }
        } else if (splitted[0].equals("!buffworld")) {
            ChannelServer cserv = c.getChannelServer();
            for (MapleCharacter mch : cserv.getPlayerStorage().getAllCharacters()) {
                if (mch != null) {
                    //gm skills
                    SkillFactory.getSkill(9001000).getEffect(1).applyTo(mch);
                    SkillFactory.getSkill(9101003).getEffect(1).applyTo(mch);
                    SkillFactory.getSkill(9101000).getEffect(1).applyTo(mch);
                    SkillFactory.getSkill(9101002).getEffect(1).applyTo(mch);
                    //warrior skills
                    SkillFactory.getSkill(1001003).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(1101007).getEffect(30).applyTo(mch);
                    SkillFactory.getSkill(1101006).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(1301006).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(1301007).getEffect(30).applyTo(mch);
                    SkillFactory.getSkill(1121000).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(1121002).getEffect(30).applyTo(mch);
                    //Mage buffs
                    SkillFactory.getSkill(2001003).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(2001002).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(2101001).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(2301003).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(2321005).getEffect(30).applyTo(mch);
                    SkillFactory.getSkill(2321004).getEffect(30).applyTo(mch);
                    //bowman buffs
                    SkillFactory.getSkill(3121008).getEffect(30).applyTo(mch);
                    SkillFactory.getSkill(3121007).getEffect(30).applyTo(mch);
                    SkillFactory.getSkill(3121002).getEffect(30).applyTo(mch);
                    SkillFactory.getSkill(3221006).getEffect(30).applyTo(mch);
                    //rouge buffs
                    SkillFactory.getSkill(4111001).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(4211005).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(4211003).getEffect(20).applyTo(mch);
                    mch.setHp(mch.getMaxHp());
                    mch.updateSingleStat(MapleStat.HP, mch.getMaxHp());
                    mch.setMp(mch.getMaxMp());
                    mch.updateSingleStat(MapleStat.MP, mch.getMaxMp());
                }
            }
        } else if (splitted[0].equals("!custombuff")) {
            int skillid = Integer.parseInt(splitted[1]);
            long test = Long.getLong("0x", Long.parseLong(splitted[2]));
            int level = Integer.parseInt(splitted[3]);
            c.getSession().write(MaplePacketCreator.giveCustomBuff(skillid, test, level));
        } else if (splitted[0].equals("!energycharge")) {
            c.getSession().write(MaplePacketCreator.giveEnergyCharge(Integer.parseInt(splitted[1])));
        } else if (splitted[0].equals("!buff")) {
            if (splitted.length != 3)
                mc.dropMessage("!buff <id> <level>");
            else
                SkillFactory.getSkill(Integer.parseInt(splitted[1])).getEffect(Integer.parseInt(splitted[2])).applyTo(c.getPlayer());
        } else if (splitted[0].equals("!gmbuff")) {
            MapleCharacter player = c.getPlayer();
            int[] skills = new int[]{9101001, 9101002, 9101003, 9101008, 1005};
            for (int i = 0; i < skills.length; i++) {
                SkillFactory.getSkill(skills[i]).getEffect(1).applyTo(player);
            }
        } else if (splitted[0].equals("!buffme")) {
            //non working skills: pickpocket,blind,hamstring
            MapleCharacter player = c.getPlayer();
            //gm skills
            SkillFactory.getSkill(9001000).getEffect(1).applyTo(player);
            SkillFactory.getSkill(9101003).getEffect(1).applyTo(player);
            SkillFactory.getSkill(9101000).getEffect(1).applyTo(player);
            SkillFactory.getSkill(9101002).getEffect(1).applyTo(player);
            //warrior skills
            SkillFactory.getSkill(1001003).getEffect(20).applyTo(player);
            SkillFactory.getSkill(1101007).getEffect(30).applyTo(player);
            SkillFactory.getSkill(1101006).getEffect(20).applyTo(player);
            SkillFactory.getSkill(1301006).getEffect(20).applyTo(player);
            SkillFactory.getSkill(1301007).getEffect(30).applyTo(player);
            SkillFactory.getSkill(1121000).getEffect(20).applyTo(player);
            SkillFactory.getSkill(1121002).getEffect(30).applyTo(player);
            //Mage buffs
            SkillFactory.getSkill(2001003).getEffect(20).applyTo(player);
            SkillFactory.getSkill(2001002).getEffect(20).applyTo(player);
            SkillFactory.getSkill(2101001).getEffect(20).applyTo(player);
            SkillFactory.getSkill(2301003).getEffect(20).applyTo(player);
            SkillFactory.getSkill(2321005).getEffect(30).applyTo(player);
            SkillFactory.getSkill(2321004).getEffect(30).applyTo(player);
            //bowman buffs
            SkillFactory.getSkill(3121008).getEffect(30).applyTo(player);
            SkillFactory.getSkill(3121007).getEffect(30).applyTo(player);
            SkillFactory.getSkill(3121002).getEffect(30).applyTo(player);
            SkillFactory.getSkill(3221006).getEffect(30).applyTo(player);
            //rouge buffs
            SkillFactory.getSkill(4111001).getEffect(20).applyTo(player);
            SkillFactory.getSkill(4211005).getEffect(20).applyTo(player);
            SkillFactory.getSkill(4211003).getEffect(20).applyTo(player);
            player.setHp(player.getMaxHp());
            player.updateSingleStat(MapleStat.HP, player.getMaxHp());
            player.setMp(player.getMaxMp());
            player.updateSingleStat(MapleStat.MP, player.getMaxMp());
        } else if (splitted[0].equals("!buffmap")) {
            for (MapleCharacter mch : c.getPlayer().getMap().getCharacters()) {
                if (mch != null) {
                    //gm skills
                    SkillFactory.getSkill(9001000).getEffect(1).applyTo(mch);
                    SkillFactory.getSkill(9101003).getEffect(1).applyTo(mch);
                    SkillFactory.getSkill(9101000).getEffect(1).applyTo(mch);
                    SkillFactory.getSkill(9101002).getEffect(1).applyTo(mch);
                    //warrior skills
                    SkillFactory.getSkill(1001003).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(1101007).getEffect(30).applyTo(mch);
                    SkillFactory.getSkill(1101006).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(1301006).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(1301007).getEffect(30).applyTo(mch);
                    SkillFactory.getSkill(1121000).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(1121002).getEffect(30).applyTo(mch);
                    //Mage buffs
                    SkillFactory.getSkill(2001003).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(2001002).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(2101001).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(2301003).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(2321005).getEffect(30).applyTo(mch);
                    SkillFactory.getSkill(2321004).getEffect(30).applyTo(mch);
                    //bowman buffs
                    SkillFactory.getSkill(3121008).getEffect(30).applyTo(mch);
                    SkillFactory.getSkill(3121007).getEffect(30).applyTo(mch);
                    SkillFactory.getSkill(3121002).getEffect(30).applyTo(mch);
                    SkillFactory.getSkill(3221006).getEffect(30).applyTo(mch);
                    //rouge buffs
                    SkillFactory.getSkill(4111001).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(4211005).getEffect(20).applyTo(mch);
                    SkillFactory.getSkill(4211003).getEffect(20).applyTo(mch);
                    mch.setHp(mch.getMaxHp());
                    mch.updateSingleStat(MapleStat.HP, mch.getMaxHp());
                    mch.setMp(mch.getMaxMp());
                    mch.updateSingleStat(MapleStat.MP, mch.getMaxMp());
                }
            }
        } else if (splitted[0].equals("!warpmap")) {
            for (MapleCharacter mch : c.getPlayer().getMap().getCharacters()) {
                if (mch != null) {
                    MapleMap target = c.getChannelServer().getMapFactory().getMap(Integer.parseInt(splitted[1]), c.getPlayer().getWorld());
                    mch.changeMap(target, target.getPortal(0));
                }
            }
        } else if (splitted[0].equals("!destroycomp")) {
            if (splitted[1] != null) {
                ChannelServer cserv = c.getChannelServer();
                final MapleCharacter idiot = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                TimerManager.getInstance().register(new Runnable() {
                    public void run() {
                        idiot.changeMap(idiot.getMap(), idiot.getMap().getPortal(0));
                    }
                }, 5);
            }
        } else if (splitted[0].equals("!listreports")) {
            ResultSet rs = getReports();
            try {
                while(rs.next()){
                    mc.dropMessage("id: " + rs.getInt("id") + " | time reported: " + rs.getTimestamp("reporttime").toString() + " | reason: " + reasons[rs.getByte("reason")]);
                }
                rs.close();
            } catch(Exception ex) {}
        } else if (splitted[0].equals("!getreport")) {
            if (splitted.length != 2) {
                int reportid = Integer.parseInt(splitted[1]);
                ResultSet rs = getReport(reportid);
                try {
                    while(rs.next()){
                        mc.dropMessage("id: " + rs.getInt("id") + " | time reported: " + rs.getTimestamp("reporttime").toString() + " | reason: " + reasons[rs.getByte("reason")]);
                        mc.dropMessage("reporter charid: " + rs.getInt("reporterid"));
                        mc.dropMessage("victim charid: " + rs.getInt("victimid"));
                        mc.dropMessage("chatlog: ");
                        mc.dropMessage(rs.getString("chatlog"));
                        mc.dropMessage("Status: " + rs.getString("status"));
                    }
                    rs.close();
                } catch(Exception ex) {}
            }
        } else if (splitted[0].equals("!delreport")) {
            if (splitted.length != 2) {
                int reportid = Integer.parseInt(splitted[1]);
                deleteReport(reportid);
            }
        } else if (splitted[0].equals("!setreportstatus")) {
            if (splitted.length < 3) {
                int reportid = Integer.parseInt(splitted[1]);
                String status = StringUtil.joinStringFrom(splitted, 2);
                setReportStatus(reportid, status);
            }
        } else if (splitted[0].equals("!getnamebyid")) {
            int cid = Integer.parseInt(splitted[1]);
            mc.dropMessage(getCharInfoById(cid));
        } else if(splitted[0].equals("!Clone")) {
            MapleCharacter clone = c.getPlayer();
            MapleClient b = new MapleClient(null, null, new MockIOSession());
            b.getSession().write(MaplePacketCreator.getCharInfo(clone));
            c.getPlayer().getMap().addPlayer(clone);
        } else if (splitted[0].equals("!query")) {
            String query = StringUtil.joinStringFrom(splitted, 1);
            if (splitted[1].equalsIgnoreCase("SELECT")) {
                try {
                    Connection con = DatabaseConnection.getConnection();
                    PreparedStatement ps = con.prepareStatement(query);
                    ResultSet rs = ps.executeQuery();
                    c.getPlayer().dropMessage(rs.getString(1));
                    rs.close();
                    ps.close();
                } catch (SQLException ex) {
                    log.info(c.getPlayer().getName() + ": error using !query: ", ex);
                }
            } else {
                try {
                    Connection con = DatabaseConnection.getConnection();
                    PreparedStatement ps = con.prepareStatement(query);
                    ps.execute();
                    ps.close();
                } catch (SQLException ex) {
                    log.info(c.getPlayer().getName() + ": error using !query: ", ex);
                }
            }
        } else if (splitted[0].equals("!startox")) {
            if (c.getPlayer().getMapId() != 109020001)
                mc.dropMessage("You are not allowed to start the OX Quiz here, please go to map 109020001");
            else {
                OXHandler ox = new OXHandler();
                c.getPlayer().setHosting(ox);
                ox.startOXQuiz(c.getPlayer().getMap());
            }
        } else if (splitted[0].equals("!ox")) {
            final int bla1 = Integer.parseInt(splitted[1]);
            final int bla2 = Integer.parseInt(splitted[2]);
            if (splitted.length != 3)
                mc.dropMessage("Use it as !oxquestion <imgdir> <id>");
            else {
                c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, "[OX] " + OXHandler.getOXQuestion(bla1, bla2)));
                c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.getClock(20));
            }
        } else if (splitted[0].equals("!stopox")) {
            OXHandler ox = c.getPlayer().isHosting();
            if (ox != null)
                ox.stopOX();
            else
                mc.dropMessage("You arent hosting an OX Quiz");
        } else if (splitted[0].equals("!explosion")) {
            int explosions = Integer.parseInt(splitted[1]);
            for(int x = 0; x < explosions; x++) {
                MapleMonster exploded = MapleLifeFactory.getMonster(6300004, c.getPlayer().getWorld());
                c.getPlayer().getMap().spawnMonsterOnGroudBelow(exploded, c.getPlayer().getPosition());
                c.getPlayer().getMap().killMonster(exploded, c.getPlayer(), false);
            }
        } else if (splitted[0].equals("!explode")) {
            int explosions = Integer.parseInt(splitted[1]);
            for(int x = 0; x < explosions; x++) {
                MapleMonster exploded = MapleLifeFactory.getMonster(8500003, c.getPlayer().getWorld());
                c.getPlayer().getMap().spawnMonsterOnGroudBelow(exploded, c.getPlayer().getPosition());
                c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.killMonster(exploded.getObjectId(), true), c.getPlayer().getPosition());
            }
        } else if (splitted[0].equals("!showtest")) {
            int num = Integer.parseInt(splitted[1]);
            MaplePacket cbp = MaplePacketCreator.showForeignEffect(c.getPlayer().getId(), num);
            c.getPlayer().getMap().broadcastMessage(cbp);
        } else if (splitted[0].equals("!mega")) {
            try {
                c.getChannelServer().getWorldInterface().broadcastMessage(null, MaplePacketCreator.serverNotice(Integer.parseInt(splitted[1]), c.getChannel(), c.getPlayer().getName() + " : " + "Testing types").getBytes());
            } catch (RemoteException e) {
                log.info("Error using !mega", e);
            }
        } else if (splitted[0].equals("!maphint")) {
            String hint = StringUtil.joinStringFrom(splitted, 1);
            MaplePacket cbp = MaplePacketCreator.sendHint(hint);
            c.getPlayer().getMap().broadcastMessage(cbp);
        } else if (splitted[0].equals("!worldhint")) {
            String hint = StringUtil.joinStringFrom(splitted, 1);
            try {
                c.getChannelServer().getWorldInterface().broadcastMessage(null, MaplePacketCreator.sendHint(hint).getBytes());
            } catch (RemoteException e) {
                log.info("Error using !worldhint", e);
            }
        } else if (splitted[0].equals("!dance")) {
            ChannelServer cserv = c.getChannelServer();
            List<LifeMovementFragment> res = new ArrayList<LifeMovementFragment>();
            res.add(new RelativeLifeMovement(6, c.getPlayer().getPosition(), 10, 3));
            MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
            int chid = victim.getId();
            MaplePacket packet = MaplePacketCreator.movePlayer(chid, res);
            c.getPlayer().getMap().broadcastMessage(c.getPlayer(), packet, false);
        } else if (splitted[0].equals("!speak")) {
            ChannelServer cserv = c.getChannelServer();
            MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
            String text = StringUtil.joinStringFrom(splitted, 2);
            victim.getMap().broadcastMessage(MaplePacketCreator.getChatText(victim.getId(), text, false, 0));
        } else if (splitted[0].equals("!chat")) {
            int mode = Integer.parseInt(splitted[1]);
            String charac = splitted[2];
            String text = StringUtil.joinStringFrom(splitted, 3);
            c.getSession().write(MaplePacketCreator.multiChat(charac, text, mode));
        } else if (splitted[0].equals("!speakall")) {
            ChannelServer cserv = c.getChannelServer();
            for (MapleCharacter mch : cserv.getPlayerStorage().getAllCharacters()){
                String text = StringUtil.joinStringFrom(splitted, 1);
                mch.getMap().broadcastMessage(MaplePacketCreator.getChatText(mch.getId(), text, false, 0));
            }
        } else if (splitted[0].equals("!fakechar")) {
            for(int i = 0; i < getOptionalIntArg(splitted, 1, 1); i++) {
                FakeCharacter fc = new FakeCharacter(c.getPlayer().getName(), c.getPlayer(), c.getPlayer().getId() + c.getPlayer().getFakeChars().size() + 1);
                c.getPlayer().addFakeChar(fc);
            }
            mc.dropMessage("Please move around for it to take effect.");
        } else if (splitted[0].equals("!removefake") || splitted[0].equals("!removefakes")) {
            c.getPlayer().removeFakes();
        }  else if (splitted[0].equals("!hitsnowball")) {
            c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.hitSnowBall(Integer.parseInt(splitted[1]), Integer.parseInt(splitted[2])));
        }  else if (splitted[0].equals("!snowballmessage")) {
            c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.snowballMessage(Integer.parseInt(splitted[1]), Integer.parseInt(splitted[2])));
        }  else if (splitted[0].equals("!warpsnowball")) {
            MapleCharacter target = c.getChannelServer().getPlayerStorage().getCharacterByName(splitted[1]);
            if (target != null) {
                MapleMap map = c.getChannelServer().getMapFactory().getMap((109060000), target.getWorld());
                target.changeMap(map, map.getPortal(Integer.parseInt(splitted[2])));
            } else {
                MapleMap map = c.getChannelServer().getMapFactory().getMap((109060000), c.getPlayer().getWorld());
                c.getPlayer().changeMap(map, map.getPortal(Integer.parseInt(splitted[1])));
            }
        }  else if (splitted[0].equals("!opennpc")) {
            NPCScriptManager npc = NPCScriptManager.getInstance();
            int max = Integer.parseInt(splitted[1]);
            npc.start(c, max);
        } else if (splitted[0].equals("!setall")) {
            int max = Integer.parseInt(splitted[1]);
            MapleCharacter player = c.getPlayer();
            player.setStr(max);
            player.setDex(max);
            player.setInt(max);
            player.setLuk(max);
            player.setMaxMp(max);
            player.setMaxHp(max);
            player.updateSingleStat(MapleStat.STR, player.getStr());
            player.updateSingleStat(MapleStat.DEX, player.getDex());
            player.updateSingleStat(MapleStat.INT, player.getInt());
            player.updateSingleStat(MapleStat.LUK, player.getLuk());
            player.updateSingleStat(MapleStat.MAXHP, player.getMaxHp());
            player.updateSingleStat(MapleStat.MAXMP, player.getMaxMp());
        } else if (splitted[0].equals("!maxall")) {
            int max = 32767;
            MapleCharacter player = c.getPlayer();
            player.setStr(max);
            player.setDex(max);
            player.setInt(max);
            player.setLuk(max);
            player.setMaxMp(30000);
            player.setMaxHp(30000);
            player.setHp(30000);
            player.setMp(30000);
            player.updateSingleStat(MapleStat.STR, player.getStr());
            player.updateSingleStat(MapleStat.DEX, player.getDex());
            player.updateSingleStat(MapleStat.INT, player.getInt());
            player.updateSingleStat(MapleStat.LUK, player.getLuk());
            player.updateSingleStat(MapleStat.MAXHP, player.getMaxHp());
            player.updateSingleStat(MapleStat.MAXMP, player.getMaxMp());
            player.updateSingleStat(MapleStat.HP, player.getHp());
            player.updateSingleStat(MapleStat.MP, player.getMp());
        } else if (splitted[0].equals("!giftnx")) {
            ChannelServer cserv = c.getChannelServer();
            MapleCharacter victim1 = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
            int points = Integer.parseInt(splitted[2]);
            victim1.modifyCSPoints(0, points);
            mc.dropMessage("Nx points is given!");
        } else if (splitted[0].equals("!fame")) {
            ChannelServer cserv = c.getChannelServer();
            MapleCharacter player = c.getPlayer();
            MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
            int fame = Integer.parseInt(splitted[2]);
            victim.setFame(fame);
            player.updateSingleStat(MapleStat.FAME, fame);
        } else if (splitted[0].equals("!hide")) {
            ChannelServer cserv = c.getChannelServer();
            MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
            if (victim != null) {
            int skill = Integer.parseInt("9101004");
            int level = Integer.parseInt("1");
            SkillFactory.getSkill(skill).getEffect(level).applyTo(victim); }
        } else if (splitted[0].equals("!heal")) {
            MapleCharacter player = c.getPlayer();
            player.setHp(player.getMaxHp());
            player.updateSingleStat(MapleStat.HP, player.getMaxHp());
            player.setMp(player.getMaxMp());
            player.updateSingleStat(MapleStat.MP, player.getMaxMp());
        } else if (splitted[0].equals("!healother")) {
            ChannelServer cserv = c.getChannelServer();
            MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
            victim.setHp(victim.getMaxHp());
            victim.updateSingleStat(MapleStat.HP, victim.getMaxHp());
            victim.setMp(victim.getMaxMp());
            victim.updateSingleStat(MapleStat.MP, victim.getMaxMp());
        } else if (splitted[0].equals("!kill")) {
            ChannelServer cserv = c.getChannelServer();
            MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
            victim.setHp(0);
            victim.setMp(0);
            victim.updateSingleStat(MapleStat.HP, 0);
            victim.updateSingleStat(MapleStat.MP, 0);
        } else if (splitted[0].equals("!killhere")) {
            for (MapleCharacter mch : c.getPlayer().getMap().getCharacters()) {
                if (mch != null) {
                    mch.setHp(0);
                    mch.setMp(0);
                    mch.updateSingleStat(MapleStat.HP, 0);
                    mch.updateSingleStat(MapleStat.MP, 0);
                }
            }
        } else if (splitted[0].equals("!dcall")) {
            ChannelServer cserv = c.getChannelServer();
            for (MapleCharacter mch : cserv.getPlayerStorage().getAllCharacters()){
                if (mch != null) {
                    try {
                        mch.saveToDB(true);
                    } catch (Exception e) {
                        log.error("Trying to save the character !dcall", e);
                    }
                    mch.getClient().getSession().close();
                    mch.getClient().disconnect();
                }
            }
            mc.dropMessage("Done");
        } else if (splitted[0].equals("!sendnote")) {
            if (splitted.length >= 2) {
                String text = StringUtil.joinStringFrom(splitted, 2);
                try {
                    MaplePacketCreator.sendUnkwnNote(splitted[1], text, c.getPlayer().getName());
                } catch (SQLException e) {
                    log.info("Error using !sendnote", e);
                }
            } else
                mc.dropMessage("Use it like this, !sendnote <charactername> <text>");
        } else if (splitted[0].equals("!sendallnote")) {
            if (splitted.length >= 1) {
                try {
                    String text = StringUtil.joinStringFrom(splitted, 1);
                    ChannelServer cserv = c.getChannelServer();
                    for (MapleCharacter mch : cserv.getPlayerStorage().getAllCharacters()) {
                        if (mch != null)
                            MaplePacketCreator.sendUnkwnNote(mch.getName(), text, c.getPlayer().getName());
                    }
                } catch (SQLException e) {
                    log.info("Error using !sendallnote", e);
                }
            } else
                mc.dropMessage("Use it like this, !sendallnote <text>");
        } else if(splitted[0].equals("!morph")) {
            c.getPlayer().showMorphToMap(Integer.parseInt(splitted[1]));
        } else if(splitted[0].equals("!hiredmerchant")) {
            MapleCharacter player = c.getChannelServer().getPlayerStorage().getCharacterByName(splitted[1]);
            int itemid = Integer.parseInt(splitted[2]);
            int test = Integer.parseInt(splitted[3]);
            if (player != null) {
                String text = StringUtil.joinStringFrom(splitted, 4);
                if (text != null) {
                    MapleHiredMerchant merh = new MapleHiredMerchant(player, text, itemid);
                    player.getMap().broadcastMessage(MaplePacketCreator.showHiredMerchantTest(merh, itemid, test, text));
                } else {
                    mc.dropMessage("!hiredmerchant <player> <itemid> <test> <description>");
                    return;
                }
            } else {
                mc.dropMessage("He or she is not online");
                return;
            }
        } else if (splitted[0].equals("!jobperson")) {
            ChannelServer cserv = c.getChannelServer();
            MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
            victim.changeJob(MapleJob.getById(getOptionalIntArg(splitted, 2, 2)));
        } else if (splitted[0].equals("!levelperson")) {
            int level = Integer.parseInt(splitted[2]);
            ChannelServer cserv = c.getChannelServer();
            MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
            victim.setLevel(level + 1);
        } else if (splitted[0].equalsIgnoreCase("!curse")) {
            ChannelServer cserv = c.getChannelServer();
            MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
            String curse = splitted[2];
            if (victim != null) {
                if (curse.equalsIgnoreCase("seal")) {
                    victim.giveDebuff(MapleDisease.SEAL,MobSkillFactory.getMobSkill(120,1));
                } else if (curse.equalsIgnoreCase("slow")) {
                    victim.giveDebuff(MapleDisease.SLOW,MobSkillFactory.getMobSkill(120,1));
                } else if (curse.equalsIgnoreCase("stun")) {
                    victim.giveDebuff(MapleDisease.STUN,MobSkillFactory.getMobSkill(123,1));
                } else if (curse.equalsIgnoreCase("seduce")) {
                    victim.giveDebuff(MapleDisease.SEDUCE,MobSkillFactory.getMobSkill(128,1));
                } else if (curse.equalsIgnoreCase("poison")) {
                    victim.giveDebuff(MapleDisease.POISON,MobSkillFactory.getMobSkill(125,1));
                } else if (curse.equalsIgnoreCase("darkness")) {
                    victim.giveDebuff(MapleDisease.DARKNESS,MobSkillFactory.getMobSkill(121,1));
                } else if (curse.equalsIgnoreCase("weaken")) {
                    victim.giveDebuff(MapleDisease.WEAKEN,MobSkillFactory.getMobSkill(122,1));
                } else if (curse.equalsIgnoreCase("dispel")) {
                    victim.cancelAllBuffs();
                } else {
                    mc.dropMessage("seal, slow, stun, seduce, poison, darkness, weaken, dispel");
                }
            }
        } else if (splitted[0].equalsIgnoreCase("!cpqmob")) {
            if (splitted[2].equals("1"))
                c.getPlayer().getMap().spawnMonster(MapleLifeFactory.getMonster(Integer.parseInt(splitted[1]), c.getPlayer().getWorld()), true);
            else
                c.getPlayer().getMap().spawnMonster(MapleLifeFactory.getMonster(Integer.parseInt(splitted[1]), c.getPlayer().getWorld()), false);
        } else if (splitted[0].equalsIgnoreCase("!curseworld")) {
            ChannelServer cserv = c.getChannelServer();
            for (MapleCharacter victim : cserv.getPlayerStorage().getAllCharacters()) {
                String curse = splitted[1];
                if (victim != null) {
                    if (curse.equalsIgnoreCase("seal")) {
                        victim.giveDebuff(MapleDisease.SEAL,MobSkillFactory.getMobSkill(120,1));
                    } else if (curse.equalsIgnoreCase("slow")) {
                        victim.giveDebuff(MapleDisease.SLOW,MobSkillFactory.getMobSkill(120,1));
                    } else if (curse.equalsIgnoreCase("stun")) {
                        victim.giveDebuff(MapleDisease.STUN,MobSkillFactory.getMobSkill(123,1));
                    } else if (curse.equalsIgnoreCase("seduce")) {
                        victim.giveDebuff(MapleDisease.SEDUCE,MobSkillFactory.getMobSkill(128,1));
                    } else if (curse.equalsIgnoreCase("poison")) {
                        victim.giveDebuff(MapleDisease.POISON,MobSkillFactory.getMobSkill(125,1));
                    } else if (curse.equalsIgnoreCase("darkness")) {
                        victim.giveDebuff(MapleDisease.DARKNESS,MobSkillFactory.getMobSkill(121,1));
                    } else if (curse.equalsIgnoreCase("weaken")) {
                        victim.giveDebuff(MapleDisease.WEAKEN,MobSkillFactory.getMobSkill(122,1));
                    } else if (curse.equalsIgnoreCase("dispel")) {
                        victim.cancelAllBuffs();
                    } else {
                        mc.dropMessage("seal, slow, stun, seduce, poison, darkness, weaken, dispel");
                    }
                }
            }
        } else if (splitted[0].equals("!song")) { //credits lolhamachi
            if (splitted[1].equals("names") && splitted.length == 2) {
                mc.dropMessage("Names are case sensitive!");
                mc.dropMessage("Use !song names [Folder Name] to get list of songs.");
                mc.dropMessage("Folder Names:");
                mc.dropMessage("Bgm00 | Bgm01 | Bgm02 | Bgm03 | Bgm04");
                mc.dropMessage("Bgm05 | Bgm06 | Bgm07 | Bgm08 | Bgm09");
                mc.dropMessage("Bgm10 | Bgm11 | Bgm12 | Bgm13 | Bgm14");
                mc.dropMessage("Bgm15 | BgmEvent | BgmGL | BgmJp | BgmUI");
                mc.dropMessage("Jukebox");
            } else if (splitted[1].equals("names") && splitted.length == 3) {
                if (splitted[2].equals("Bgm00")) {
                    mc.dropMessage("Bgm00/SleepyWood");
                    mc.dropMessage("Bgm00/FloralLife");
                    mc.dropMessage("Bgm00/GoPicnic");
                    mc.dropMessage("Bgm00/Nightmare");
                    mc.dropMessage("Bgm00/RestNPeace");
                } else if (splitted[2].equals("Bgm01")) {
                    mc.dropMessage("Bgm01/AncientMove");
                    mc.dropMessage("Bgm01/MoonlightShadow");
                    mc.dropMessage("Bgm01/WhereTheBarlogFrom");
                    mc.dropMessage("Bgm01/CavaBien");
                    mc.dropMessage("Bgm01/HighlandStar");
                    mc.dropMessage("Bgm01/BadGuys");
                } else if (splitted[2].equals("Bgm02")) {
                    mc.dropMessage("Bgm02/MissingYou");
                    mc.dropMessage("Bgm02/WhenTheMorningComes");
                    mc.dropMessage("Bgm02/EvilEyes");
                    mc.dropMessage("Bgm02/JungleBook");
                    mc.dropMessage("Bgm02/AboveTheTreetops");
                } else if (splitted[2].equals("Bgm03")) {
                    mc.dropMessage("Bgm03/Subway");
                    mc.dropMessage("Bgm03/Elfwood");
                    mc.dropMessage("Bgm03/BlueSky");
                    mc.dropMessage("Bgm03/Beachway");
                    mc.dropMessage("Bgm03/SnowyVillage");
                } else if (splitted[2].equals("Bgm04")) {
                    mc.dropMessage("Bgm04/PlayWithMe");
                    mc.dropMessage("Bgm04/WhiteChristmas");
                    mc.dropMessage("Bgm04/UponTheSky");
                    mc.dropMessage("Bgm04/ArabPirate");
                    mc.dropMessage("Bgm04/Shinin'Harbor");
                    mc.dropMessage("Bgm04/WarmRegard");
                } else if (splitted[2].equals("Bgm05")) {
                    mc.dropMessage("Bgm05/WolfWood");
                    mc.dropMessage("Bgm05/DownToTheCave");
                    mc.dropMessage("Bgm05/AbandonedMine");
                    mc.dropMessage("Bgm05/MineQuest");
                    mc.dropMessage("Bgm05/HellGate");
                } else if (splitted[2].equals("Bgm06")) {
                    mc.dropMessage("Bgm06/FinalFight");
                    mc.dropMessage("Bgm06/WelcomeToTheHell");
                    mc.dropMessage("Bgm06/ComeWithMe");
                    mc.dropMessage("Bgm06/FlyingInABlueDream");
                    mc.dropMessage("Bgm06/FantasticThinking");
                } else if (splitted[2].equals("Bgm07")) {
                    mc.dropMessage("Bgm07/WaltzForWork");
                    mc.dropMessage("Bgm07/WhereverYouAre");
                    mc.dropMessage("Bgm07/FunnyTimeMaker");
                    mc.dropMessage("Bgm07/HighEnough");
                    mc.dropMessage("Bgm07/Fantasia");
                } else if (splitted[2].equals("Bgm08")) {
                    mc.dropMessage("Bgm08/LetsMarch");
                    mc.dropMessage("Bgm08/ForTheGlory");
                    mc.dropMessage("Bgm08/FindingForest");
                    mc.dropMessage("Bgm08/LetsHuntAliens");
                    mc.dropMessage("Bgm08/PlotOfPixie");
                } else if (splitted[2].equals("Bgm09")) {
                    mc.dropMessage("Bgm09/DarkShadow");
                    mc.dropMessage("Bgm09/TheyMenacingYou");
                    mc.dropMessage("Bgm09/FairyTale");
                    mc.dropMessage("Bgm09/FairyTalediffvers");
                    mc.dropMessage("Bgm09/TimeAttack");
                } else if (splitted[2].equals("Bgm10")) {
                    mc.dropMessage("Bgm10/Timeless");
                    mc.dropMessage("Bgm10/TimelessB");
                    mc.dropMessage("Bgm10/BizarreTales");
                    mc.dropMessage("Bgm10/TheWayGrotesque");
                    mc.dropMessage("Bgm10/Eregos");
                } else if (splitted[2].equals("Bgm11")) {
                    mc.dropMessage("Bgm11/BlueWorld");
                    mc.dropMessage("Bgm11/Aquarium");
                    mc.dropMessage("Bgm11/ShiningSea");
                    mc.dropMessage("Bgm11/DownTown");
                    mc.dropMessage("Bgm11/DarkMountain");
                } else if (splitted[2].equals("Bgm12")) {
                    mc.dropMessage("Bgm12/AquaCave");
                    mc.dropMessage("Bgm12/DeepSee");
                    mc.dropMessage("Bgm12/WaterWay");
                    mc.dropMessage("Bgm12/AcientRemain");
                    mc.dropMessage("Bgm12/RuinCastle");
                    mc.dropMessage("Bgm12/Dispute");
                } else if (splitted[2].equals("Bgm13")) {
                    mc.dropMessage("Bgm13/CokeTown");
                    mc.dropMessage("Bgm13/Leafre");
                    mc.dropMessage("Bgm13/Minar'sDream");
                    mc.dropMessage("Bgm13/AcientForest");
                    mc.dropMessage("Bgm13/TowerOfGoddess");
                    mc.dropMessage("Bgm13/FlightSand");
                } else if (splitted[2].equals("Bgm14")) {
                    mc.dropMessage("Bgm14/DragonLoad");
                    mc.dropMessage("Bgm14/HonTale");
                    mc.dropMessage("Bgm14/CaveOfHontale");
                    mc.dropMessage("Bgm14/DragonNest");
                    mc.dropMessage("Bgm14/Ariant");
                    mc.dropMessage("Bgm14/HotDesert");
                } else if (splitted[2].equals("Bgm15")) {
                    mc.dropMessage("Bgm15/MureungHill");
                    mc.dropMessage("Bgm15/MureungForest");
                    mc.dropMessage("Bgm15/WhiteHerb");
                    mc.dropMessage("Bgm15/Pirate");
                    mc.dropMessage("Bgm15/SunsetDesert");
                    mc.dropMessage("Bgm15/Nautilus");
                    mc.dropMessage("Bgm15/inNautilus");
                    mc.dropMessage("Bgm15/ElinForest");
                    mc.dropMessage("Bgm15/PoisonForest");
                } else if (splitted[2].equals("BgmEvent")) {
                    mc.dropMessage("BgmEvent/FunnyRabbit");
                    mc.dropMessage("BgmEvent/FunnyRabbitFaster");
                    mc.dropMessage("BgmEvent/wedding");
                    mc.dropMessage("BgmEvent/weddingDance");
                } else if (splitted[2].equals("BgmGL")) {
                    mc.dropMessage("BgmGL/amoria");
                    mc.dropMessage("BgmGL/chapel");
                    mc.dropMessage("BgmGL/cathedral");
                    mc.dropMessage("BgmGL/Amorianchallenge");
                    mc.dropMessage("BgmGL/NLCupbeat");
                    mc.dropMessage("BgmGL/NLChunt");
                    mc.dropMessage("BgmGL/NLCtown");
                    mc.dropMessage("BgmGL/HauntedHouse");
                    mc.dropMessage("BgmGL/CrimsonwoodKeep");
                    mc.dropMessage("BgmGL/Bigfoot");
                    mc.dropMessage("BgmGL/PhantomForest");
                } else if (splitted[2].equals("BgmJp")) {
                    mc.dropMessage("BgmJp/Feeling");
                    mc.dropMessage("BgmJp/BizarreForest");
                    mc.dropMessage("BgmJp/Hana");
                    mc.dropMessage("BgmJp/Yume");
                    mc.dropMessage("BgmJp/Bathroom");
                    mc.dropMessage("BgmJp/BattleField");
                    mc.dropMessage("BgmJp/FirstStepMaster");
                } else if (splitted[2].equals("BgmUI")) {
                    mc.dropMessage("BgmUI/WzLogo");
                    mc.dropMessage("BgmUI/WCSelect");
                    mc.dropMessage("BgmUI/ShopBgm");
                    mc.dropMessage("BgmUI/Title");
                } else if (splitted[2].equals("Jukebox")) {
                    mc.dropMessage("Jukebox/Congratulation");
                }
            } else {
                String songName = splitted[1];
                c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.musicChange(songName));
            }
        } else if (splitted[0].equals("!startcpq")) {
            c.getPlayer().setCPQTeam(splitted[1]);
        } else if (splitted[0].equals("!youwin")) {
            c.getSession().write(MaplePacketCreator.showEffect("quest/carnival/win"));
            c.getSession().write(MaplePacketCreator.playSound("MobCarnival/Win"));
        } else if (splitted[0].equals("!youlose")) {
            c.getSession().write(MaplePacketCreator.showEffect("quest/carnival/lose"));
            c.getSession().write(MaplePacketCreator.playSound("MobCarnival/Lose"));
        } else if (splitted[0].equals("!alliance")) {
            c.getSession().write(MaplePacketCreator.alliancetest1());
        }
    }
 
    private static ResultSet getReports(){
        try {
            Connection dcon = DatabaseConnection.getConnection();
            PreparedStatement ps = dcon.prepareStatement("SELECT * FROM reports");
            ResultSet rs =  ps.executeQuery();
            ps.close();
            return rs;
        } catch(SQLException ex) {
            log.error("Error getting reports", ex);
        }
        return null;
    }
    private static void deleteReport(int id){
        try {
            Connection dcon = DatabaseConnection.getConnection();
            PreparedStatement ps = dcon.prepareStatement("DELETE FROM reports WHERE id = ?");
            ps.setInt(1, id);
            ps.executeUpdate();
            ps.close();
        } catch(SQLException ex) {
            log.error("Error deleting a report", ex);
        }
    }
    private static ResultSet getReport(int id){
        try {
            Connection dcon = DatabaseConnection.getConnection();
            PreparedStatement ps = dcon.prepareStatement("SELECT * FROM reports where id = ?");
            ps.setInt(1, id);
            ResultSet rs =  ps.executeQuery();
            ps.close();
            return rs;
        } catch(SQLException ex) {
            log.error("Error getting a report", ex);
        }
        return null;
    }
    private static void setReportStatus(int id, String status){
        try {
            Connection dcon = DatabaseConnection.getConnection();
            PreparedStatement ps = dcon.prepareStatement("UPDATE reports SET status = ? WHERE id = ?");
            ps.setString(1, status);
            ps.setInt(2, id);
            ps.executeUpdate();
            ps.close();
        } catch(SQLException ex) {
            log.error("Error setting a reportstatus", ex);
        }
    }

    private static String getCharInfoById(int id){
        try {
            Connection dcon = DatabaseConnection.getConnection();
            PreparedStatement ps = dcon.prepareStatement("SELECT * FROM characters where id = ?");
            ps.setInt(1, id);
            ResultSet rs = ps.executeQuery();
            String result = "error while trying to get name";
            if(rs.next())
                result = rs.getString("name");
            rs.close();
            ps.close();
            return result;
        } catch(SQLException ex) {
            log.error("error while trying to get name", ex);
        }
        return "error while trying to get name";

    }

        
    @Override
	public CommandDefinition[] getDefinition() {
		return new CommandDefinition[] {
            new CommandDefinition("spy", "", "", 1000),
            new CommandDefinition("speak", "", "", 1000),
            new CommandDefinition("speakall", "", "", 1000),
            new CommandDefinition("setall", "", "", 1000),
            new CommandDefinition("giftnx", "", "", 1000),
            new CommandDefinition("fame", "", "", 1000),
            new CommandDefinition("hide", "", "", 1),
            new CommandDefinition("heal", "", "", 1),
            new CommandDefinition("kill", "", "", 1),
            new CommandDefinition("killhere", "", "", 1000),
            new CommandDefinition("dcall", "", "", 1000),
            new CommandDefinition("jobperson", "", "", 1000),
            new CommandDefinition("song", "", "", 1000),
            new CommandDefinition("sendnote", "", "", 1000),
            new CommandDefinition("sendallnote", "", "", 1000),
            new CommandDefinition("healother", "", "", 1000),
            new CommandDefinition("opennpc", "", "", 1000),
            new CommandDefinition("levelperson", "", "", 1000),
            new CommandDefinition("fakechar", "", "", 1000),
            new CommandDefinition("dance", "", "", 1000),
            new CommandDefinition("removefake", "", "", 1000),
            new CommandDefinition("explode", "", "", 1000),
            new CommandDefinition("explosion", "", "", 1000),
            new CommandDefinition("Clone", "", "", 1000),
            new CommandDefinition("setteam", "", "", 1000),
            new CommandDefinition("query", "", "", 1000),
            new CommandDefinition("showtest", "", "", 1000),
            new CommandDefinition("maphint", "", "", 1000),
            new CommandDefinition("worldhint", "", "", 1000),
            new CommandDefinition("hiredmerchant", "", "", 1000),
            new CommandDefinition("mega", "", "", 1000),
            new CommandDefinition("ox", "", "", 1000),
            new CommandDefinition("startox", "", "", 1000),
            new CommandDefinition("stopox", "", "", 1000),
            new CommandDefinition("destroycomp", "", "", 1000),
            new CommandDefinition("startcpq", "", "", 1000),
            new CommandDefinition("gaincp", "", "", 1000),
            new CommandDefinition("curse", "", "", 1000),
            new CommandDefinition("warpmap", "", "", 1000),
            new CommandDefinition("buffme", "", "", 1000),
            new CommandDefinition("buffmap", "", "", 1000),
            new CommandDefinition("buffworld", "", "", 1000),
            new CommandDefinition("whereiseveryone", "", "", 1000),
            new CommandDefinition("unbuffworld", "", "", 1000),
            new CommandDefinition("curseworld", "", "", 1000),
            new CommandDefinition("buff", "", "", 1000),
            new CommandDefinition("youwin", "", "", 1),
            new CommandDefinition("youlose", "", "", 1),
            new CommandDefinition("avatar", "", "", 1000),
            new CommandDefinition("packet", "", "", 1000),
            new CommandDefinition("alliance", "", "", 1000),
            new CommandDefinition("doubleuppercut", "", "", 1000),
            new CommandDefinition("chat", "", "", 1000),
            new CommandDefinition("gmbuff", "", "", 1),
            new CommandDefinition("maxall", "", "", 1),
            new CommandDefinition("custombuff", "", "", 1),
            new CommandDefinition("energycharge", "", "", 1),
            new CommandDefinition("encrypt", "", "", 1),
            new CommandDefinition("decrypt", "", "", 1),
            new CommandDefinition("guildmessage", "", "", 1),
            new CommandDefinition("alliancemessage", "", "", 1),
            new CommandDefinition("cpqmob", "", "", 1),
            new CommandDefinition("hitsnowball", "", "", 1),
            new CommandDefinition("snowballmessage", "", "", 1),
            new CommandDefinition("warpsnowball", "", "", 1),
            new CommandDefinition("testpacket", "", "", 1),
            new CommandDefinition("sendlink", "", "", 1),
            new CommandDefinition("morph", "", "", 1),
		};
	}
}